#!groovy
package org.efssc
def getimagetag(appversion){
    sh "cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime"
    env.allcomit_id = sh (script: 'git rev-parse HEAD ${GIT_COMMIT}', returnStdout: true).trim()
    commit_id = env.allcomit_id[0..7]
    tag_time = new Date().format("yyyyMMddHHmm")
    env.image_name = "${appversion}-${commit_id}-${tag_time}"
    println("${image_name}")
    return "${image_name}"
}
